package com.checkoutcheckins.client.data.foursquare;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.NotPersistent;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class FoursquareUser implements Serializable {

	private static final long serialVersionUID = -4003953804669229071L;

	@PrimaryKey
	@Persistent
	private String id;
	
	@Persistent
	private String firstname;
	
	@Persistent
	private String lastname;
	
	@Persistent
	private String photo;
	
	@Persistent
	private String gender;
	
	@Persistent
	private String phone;
	
	@Persistent
	private String email;
	
	@Persistent
	private String twitter;
	
	@Persistent
	private String facebook;
	
	@NotPersistent
	private String friendstatus;
	
	@NotPersistent
	private Checkin checkin;
	
	@NotPersistent
	private List<Badge> badges;
	
	@NotPersistent
	private List<Venue> mayor;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getFirstname() {
		return firstname;
	}

	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}

	public String getLastname() {
		return lastname;
	}

	public void setLastname(String lastname) {
		this.lastname = lastname;
	}

	public String getPhoto() {
		return photo;
	}

	public void setPhoto(String photo) {
		this.photo = photo;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getTwitter() {
		return twitter;
	}

	public void setTwitter(String twitter) {
		this.twitter = twitter;
	}

	public String getFacebook() {
		return facebook;
	}

	public void setFacebook(String facebook) {
		this.facebook = facebook;
	}

	public String getFriendstatus() {
		return friendstatus;
	}

	public void setFriendstatus(String friendstatus) {
		this.friendstatus = friendstatus;
	}

	public Checkin getCheckin() {
		return checkin;
	}

	public void setCheckin(Checkin checkin) {
		this.checkin = checkin;
	}

	public List<Badge> getBadges() {
		return badges;
	}

	public void setBadges(List<Badge> badges) {
		this.badges = badges;
	}

	public List<Venue> getMayor() {
		return mayor;
	}

	public void setMayor(List<Venue> mayor) {
		this.mayor = mayor;
	}

	public List<String> getMayorVenueIds() {

		List<String> venueIdList = new ArrayList<String>();

		if (mayor != null) {
			for (Venue venue : mayor) {
				venueIdList.add(venue.getId());
			}
		}

		return venueIdList;
	}

}
